package com.corgi.multi.anno.service.impl;

import com.corgi.multi.anno.config.dynamic.TargetDataSource;
import com.corgi.multi.anno.dao.ARepository;
import com.corgi.multi.anno.domain.A;
import com.corgi.multi.anno.service.AService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * AServiceImpl
 *
 * @title: AServiceImpl
 * @description:
 * @author: dengmiao
 * @create: 2020-05-25 17:44
 **/
@Service
public class AServiceImpl implements AService {

    @Autowired
    private ARepository aRepository;

    @TargetDataSource(name = "ds1")
    @Override
    public List<A> findAll() {
        return aRepository.findAll();
    }
}
